home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / gfx_kb.h.z / gfx_kb.h
Text File  |  1992-04-03  |  2KB  |  88 lines

  1. /*
  2.  * Keyboard definitions.
  3.  *
  4.  * $Revision: 1.14 $
  5.  */
  6.  
  7. #define    TERM_NAME    "iris_ansi"
  8.  
  9. #define    LAMP_NUMLOCK    0x20
  10. #define    LAMP_CAPSLOCK    0x40
  11. #define    LAMP_SCROLLLOCK    0x05
  12. #define    LAMP_L1        0x09
  13. #define    LAMP_L2        0x11
  14. #define    LAMP_L3        0x21
  15. #define    LAMP_L4        0x41
  16.  
  17. #define    TIME_DELAY1    40000    /* time for kb to reset            */
  18. #define    TIME_DELAY2    10000    /* time for 2nd config byte to arrive    */
  19.  
  20. /* this works for both old and new keyboards */
  21. #define    CONFIG_REQUEST    0x10    /* kb request config bytes code        */
  22.  
  23. /* config byte returned old kb    */
  24. #define    CONFIG_BYTE_OLDKB    0xaa
  25. /* config byte returned new kb    */
  26. #define    CONFIG_BYTE_NEWKB    0x6e
  27.  
  28. /* control bits for new keyboard, low bit = 0 */
  29. #define    NEWKB_SHORTBEEP        0x02
  30. #define    NEWKB_LONGBEEP        0x04
  31. #define    NEWKB_NOCLICK        0x08
  32. #define    NEWKB_GETCONFIG        0x10
  33. #define    NEWKB_SETDS1        0x20
  34. #define    NEWKB_SETDS2        0x40
  35. #define    NEWKB_AUTOREPEAT    0x80
  36.  
  37. /* control bits for new keyboard, low bit = 1 */
  38. #define    NEWKB_DS1ANDDS2        0x03
  39. #define    NEWKB_SETDS3        0x05
  40. #define    NEWKB_SETDS4        0x09
  41. #define    NEWKB_SETDS5        0x11
  42. #define    NEWKB_SETDS6        0x21
  43. #define    NEWKB_SETDS7        0x41
  44. #define    NEWKB_OFFDS        0x01        /* disable most DS's */
  45.  
  46. /* soft keyboard states */
  47. #define STATE_ALT    0x01
  48. #define STATE_CONTROL    0x02
  49. #define STATE_SHIFT    0x04
  50. #define STATE_CAPSLOCK    0x08
  51. #define STATE_NUMLOCK    0x10
  52.  
  53. /*
  54.  * We manage an extended ascii keyboard set with this code.  To do this,
  55.  * the standard 256 ascii sequence is represented in a standard fashion.
  56.  * An addtions will be numerically larger than 256.
  57.  */
  58. #define    CODE_BREAK    0x0100        /* break code */
  59.  
  60. /* constants for the iris keyboard */
  61. #define    KBD_BEEPCMD    0x00        /* low bit clear --> beep commands */
  62. #define    KBD_LEDCMD    0x01        /* low bit set --> led commands */
  63. #define    KBD_RESET    0x10        /* reset the keyboard */
  64. #define    KBD_REPLY    0xAA        /* reply from keyboard after reset */
  65.  
  66. /* beep commands */
  67. #define    KBD_CLICK    0x08        /* key click: active low */
  68. #define    KBD_SHORTBEEP    0x02        /* do a short beep */
  69. #define    KBD_LONGBEEP    0x04        /* do a long beep */
  70.  
  71. /* led commands */
  72. #define    KBD_LED0    0x00
  73. #define    KBD_LED1    0x02        /* led0 and led1 are inverses */
  74. #define    KBD_LED2    0x04
  75. #define    KBD_LED3    0x08
  76. #define    KBD_LED4    0x10
  77. #define    KBD_LED5    0x20
  78. #define    KBD_LED6    0x40
  79. #define    KBD_LED8    0x80
  80.  
  81. /* defaults */
  82. #define    KBD_BEEPDEFAULT    (KBD_BEEPCMD|KBD_CLICK|KBD_SHORTBEEP)
  83. #define    KBD_LEDDEFAULT    (KBD_LEDCMD|KBD_LED0)
  84.  
  85. /* For international stuff */
  86. #define US_KBD    0xcc    /* AMERICAN/ENGLISH KEYBOARD */
  87. #define ISO_KBD 0xee    /* INTERNATIONAL KEYBOARD */
  88.